<!---- Creator: Eoly -->
<!---- On 2017/9/20 -->
<!---- Call https://palerock.cn -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>AHook Testing 2</title>
    <!--<script src="ajaxHook.js"></script>-->
    <script src="../build/hooker-mini.js"></script>
    <!--<script src="../src/plugins/hookAll.js"></script>-->
    <script>
        var id = aHook.register('.*/login', {
            hookSend: function (args) {
            },
            hookResponse: function (e) {
                console.log(this)
            }
        });
        console.log(id);
    </script>
    <script src="lib/jquery-3.1.1.js"></script>
    <script>
        function send(){
            $.ajax({
                method: 'post',
                dataType: "json",
                contentType: "application/json;charset=UTF-8",
                url: 'https://palerock.cn/h5_back/login',
                data: '{"userPhoneNumber":"xiaoxigua","userLoginPsw":"12"}',
                success: function (res) {
                    console.log(res);
                },
                error: function (res) {
                    console.log(res);
                }
            })
        }

    </script>
</head>
<body>
    <button onclick="send()">hhhhhh</button>
</body>
</html>